package com.duzhuo.springsecurity.exceptions;

import com.duzhuo.springsecurity.utils.R;
import io.jsonwebtoken.ExpiredJwtException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
@ResponseBody
public class exception {
    @ExceptionHandler(ExpiredJwtException.class)
    public R expiredJwtException(){
        return R.error().message("JWT令牌不对");
    }

}
